<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<script type="text/javascript" src="<%=basePath %>/login/scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<%=basePath %>/login/scripts/jquery.quickpaginate.js"></script>
<script type="text/javascript">
	$(function(){
		$("#dataTable tbody tr").quickpaginate({ perpage: 10, pager : $("#temp") });
	});
</script>
<style type="text/css">
th{
	color:#375B91;
}
</style>
<div id="content2">
		<div id="box2">
			<div>
				<h3>
					当前位置&nbsp;:&nbsp;灾情数据管理&nbsp;>>&nbsp;历史灾情查询&nbsp;>>&nbsp;气象灾害年份统计表
				</h3>
			</div>
			<form action="sumReportsAction!reports_year.action" method="post"> 
			<div id="search_bar2">
				<table width="350" border="0" cellpadding="0" cellspacing="3">
					<tr>
					  <td width="40"> 类型: </td>
					  <td width="100">
						<s:select list="dstypes" listKey="dtName" listValue="dtName" value="report.dstype" name="report.dstype" headerKey="0" headerValue="--所有灾害类型--" theme="simple"></s:select>
					</td>
						<td width="55">时间段:
						</td>
						<td width="400">
						 <%--<s:select list="#{'2020':'2020','2019':'2019','2018':'2018','2017':'2017','2016':'2016','2015':'2015','2014':'2014','2013':'2013','2012':'2012','2011':'2011','2010':'2010','2009':'2009','2008':'2008','2007':'2007'}" headerKey="0" headerValue="--请选择年份--" value="report.startYear" name="report.startYear" theme="simple"></s:select>--%>
						 <select name="report.startYear" class="simple">
							<option value="0">--所有年份--</option>
							<c:forEach begin="1983" end="2020" step="1" var="ii">
								<option <c:if test="${report.startYear == ii }">selected="selected"</c:if>>${ii}</option>
							</c:forEach>
						</select>
						 至
						 <%--<s:select list="#{'2020':'2020','2019':'2019','2018':'2018','2017':'2017','2016':'2016','2015':'2015','2014':'2014','2013':'2013','2012':'2012','2011':'2011','2010':'2010','2009':'2009','2008':'2008','2007':'2007'}" headerKey="0" headerValue="--请选择年份--" value="report.endYear" name="report.endYear" theme="simple"></s:select>--%>
						 <select name="report.endYear" class="simple">
							<option value="0">--所有月份--</option>
							<c:forEach begin="1983" end="2020" step="1" var="ii">
								<option <c:if test="${report.endYear == ii }">selected="selected"</c:if>>${ii}</option>
							</c:forEach>
						</select>
						</td>
						<td>
							<input type="submit" value="查询" />
						</td>
					</tr>
				</table>
	    </div>
			</form>
			<div>${reportTitle }</div>
			<table id="dataTable">
				<thead>
					<tr>
						<th>镇区</th>
						<th>直接经济损失</th>
						<th>受伤人数</th>
						<th>失踪人数</th>
						<th>死亡人数</th>
						<th>受灾总人数</th>
						<th>灾害发生次数</th>
					</tr>
				</thead>
				<tbody>
				<c:forEach items="${reportList}" var="report">
					<tr>
						<td class="a-center">
							${report.town }
						</td>
						<td class="a-center">
							${report.moneyLoss }
						</td>
						<td class="a-center">
							${report.hurt}
						</td>
						<td class="a-center">
							${report.lost}
						</td>
						<td class="a-center">
							${report.dead}
						</td>
						<td class="a-center">
							${report.dstAll}
						</td>
						<td class="a-center">
							${report.actTime}
						</td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
			<div id="temp" style="height: 30px;padding-left:500px;"></div>
			<jsp:include page="flash.jsp"></jsp:include>
			</div>
		<br />
	</div>
